package com.easybuilder.core.im.controller;

import com.easybuilder.common.base.controller.BaseController;
import com.easybuilder.core.im.service.DingMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dingmessage")
public class DingMessageController extends BaseController {
    @Autowired
    private DingMessageService dingMessageService;

    @PostMapping("/robot/send")
    public Result<Object> sendRobotMsg(String robotName, String message) {
        dingMessageService.sendRobotMsg(robotName, message);
        return OK("发送完成");
    }
}
